订单管理API
获取订单列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| order_id | String | Body | 订单ID |
| order_number | String | Body | 订单编号 |
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅号码 |
| room_type_id | String | Body | 房间类型ID |
| room_type_name | String | Body | 房间类型名称 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| order_state | String | Body | 订单状态 check_in:未入住 checked_in:已入住 checked_out:已退房 |
| guests | []Object<guest> | Body | 客人信息 |
guest说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| guest_id | String | Body | 客人ID |
| guest_name | String | Body | 客人名称 |
| String | Body | 邮箱 | |
| phone | String | Body | 电话 |
| id_card | String | Body | 身份证 |
| passport | String | Body | 护照 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_order_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"order_id": "orx9a621c1ae77040d697bd2134700f57",
"order_number": "20250725064924573999",
"residence_id": "rorx9a621c1ae77040d697bd2134700f5",
"residence_no": "101",
"room_type_id": "rorx9a621c1ae77040d697bd2134700fg",
"room_type_name": "test",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"order_state": "check_in",
"guests": [
{
"guest_id": "gorx9a621c1ae77040d697bd2134700f5",
"guest_name": "dom",
"email": "test@akubela.com",
"phone": "1234567",
"id_card": "1234567890",
"passport": ""
}
]
}
]
}
失败返回示例
见 接口失败返回
获取订单信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| order_id | String | Body | 是 | 订单ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| order_number | String | Body | 订单编号 |
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅号码 |
| room_type_id | String | Body | 房间类型ID |
| room_type_name | String | Body | 房间类型名称 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| order_state | String | Body | 订单状态 check_in:未入住 checked_in:已入住 checked_out:已退房 |
| guests | []Object<guest> | Body | 客人信息 |
| source | String | Body | 来源 |
| remark | String | Body | 备注 |
| enable_booking | Boolean | Body | 判断是否启用预约服务 true:启用 false:禁用 |
guest说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| guest_id | String | Body | 客人ID |
| guest_name | String | Body | 客人名称 |
| String | Body | 邮箱 | |
| phone | String | Body | 电话 |
| id_card | String | Body | 身份证 |
| passport | String | Body | 护照 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_order_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"order_id": "orx9a621c1ae77040d697bd2134700f57"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"order_number": "20250725064924573999",
"residence_id": "rorx9a621c1ae77040d697bd2134700f5",
"residence_no": "101",
"room_type_id": "rorx9a621c1ae77040d697bd2134700fg",
"room_type_name": "test",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"order_state": "check_in",
"source": "SaaS",
"remark": "",
"enable_booking": false,
"guests": [
{
"guest_id": "gorx9a621c1ae77040d697bd2134700f5",
"guest_name": "dom",
"email": "test@akubela.com",
"phone": "1234567",
"id_card": "1234567890",
"passport": ""
}
]
}
}
失败返回示例
见 接口失败返回
创建订单信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
| guest | Object<guest> | Body | 是 | 客人信息 |
| source | String | Body | 是 | 来源 |
| remark | String | Body | 是 | 备注 |
| enable_booking | Boolean | Body | 是 | 判断是否启用预约服务 true:启用 false:禁用 |
guest说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| guest_name | String | Body | 是 | 客人名称 |
| String | Body | 是 | 邮箱 | |
| phone | String | Body | 是 | 电话 |
| id_card | String | Body | 是 | 身份证 |
| passport | String | Body | 是 | 护照 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| order_id | String | Body | 订单ID |
| order_number | String | Body | 订单编号 |
| guest_id | String | Body | 客人ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_order_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "rorx9a621c1ae77040d697bd2134700f5",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"source": "SaaS",
"remark": "",
"enable_booking": false,
"guest": {
"guest_name": "dom",
"email": "test@akubela.com",
"phone": "1234567",
"id_card": "1234567890",
"passport": ""
}
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"order_id": "r2a621c1ae77040d697bd2134700f57e2",
"order_number": "20250725064924573993",
"guest_id": "gorx9a621c1ae77040d697bd2134700f5"
}
}
失败返回示例
见 接口失败返回
更新订单信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| order_id | String | Body | 是 | 订单ID |
| residence_id | String | Body | 是 | 住宅ID |
| room_type_id | String | Body | 是 | 房间类型ID |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
| order_state | String | Body | 是 | 订单状态 check_in:未入住 checked_in:已入住 checked_out:已退房 |
| source | String | Body | 是 | 来源 |
| remark | String | Body | 是 | 备注 |
| enable_booking | Boolean | Body | 是 | 判断是否启用预约服务 true:启用 false:禁用 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_order_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"order_id": "o2a621c1ae77040d697bd2134700f57e1",
"residence_id": "rorx9a621c1ae77040d697bd2134700f5",
"room_type_id": "rorx9a621c1ae77040d697bd2134700fg",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"order_state": "check_in",
"source": "SaaS",
"remark": "",
"enable_booking": false
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除订单信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| order_id | String | Body | 是 | 订单ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_order_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"order_id": "orbr2c4b070cc928496198944858b343f"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回